{% extends "BillingBundle::admin_layout.html.twig" %}

{% macro field(row, lname, label) %}
    <tr>
        <td class="label">
            <label id="l{{ lname }}" for="{{ lname }}">{{ label }}:</label>
        </td>
        <td class="field">
            {{ form_widget(row) }}
        </td>
        <td class="status"></td>
        <td>
            {{ form_errors(row) }}
        </td>
    </tr>
{% endmacro %}

{% block content %}

<link rel="stylesheet" type="text/css" media="screen" href="{{ asset('bundles/billing/css/validate.css') }}" />
<script src="{{ asset('bundles/billing/js/jquery.js') }}" type="text/javascript"></script>
<script src="{{ asset('bundles/billing/js/jquery.validate.js') }}" type="text/javascript"></script>
<script src="{{ asset('bundles/billing/js/validate_vps_tarif.js') }}" type="text/javascript"></script>

<h4>Создание нового тарифа на VPS:</h4>

<div id="add_box">
  <div id="add_wrap">
    <form id="add_form" method="post" action="#">
        <table>
            {{ _self.field(form.name, 'name', 'Название') }}
            {{ _self.field(form.cost, 'cost', 'Стоимость в день') }}
            {{ _self.field(form.add_ip_cost, 'add_ip_cost', 'Стоимость добавления ip') }}
            {{ _self.field(form.add_hdd_cost, 'add_hdd_cost', 'Стоимость добавления hdd') }}
            {{ _self.field(form.cpu, 'cpu', 'CPU') }}
            {{ _self.field(form.ram, 'ram', 'RAM') }}
            {{ _self.field(form.hdd, 'hdd', 'HDD') }}
            {{ _self.field(form.ded_ip_count, 'ded_ip_count', 'Количество выделяемых ip') }}
            {{ _self.field(form.dns_access, 'dns_access', 'Доступ к DNS') }}
            {{ _self.field(form.is_active, 'is_active', 'Активен') }}
            {{ form_widget(form._token) }}
        <tr>
            <td>
            <div class="field">
                <input name="add_tarif" type="submit" value="Create tarif"/>
            </div>
            </td>
        </tr>
        </table>
    </form>
   </div>
</div>


{% endblock %}
